/*
 * @LastEditors: yuSeen
 * @LastEditTime: 2021-12-29 20:30:30
 */
import request from '../../request'
import type { IAllObject } from '@/types/base'
import { ISongList } from './types'

// 获取每日推荐歌单
export function getDailyRecommendList(limit: number = 29) {
    return request.get<ISongList[]>('/personalized', {limit}, false)
}

// 获取每日推荐歌曲
export function getDailyRecommendSong() {
    return request.get<IAllObject>('/recommend/songs', null, false)
}

// 获取歌单详情
export function getSongListDetail(id: number) {
    return request.get<IAllObject>('/playlist/detail', {id}, false)
}

// 获取歌单内所有歌曲
export function getSongListSongs(id: number) {
    return request.get<IAllObject>('/playlist/track/all', {id}, false)
}